package com.tepth.busfix.main.home;

import com.tepth.busfix.base.BaseModel;
import com.tepth.busfix.base.BasePresenter;
import com.tepth.busfix.base.BaseView;
import com.tepth.busfix.bean.reponse.BusType;
import com.tepth.busfix.bean.reponse.TroubleContent;
import com.tepth.busfix.network.ApiModel;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.Observable;

/**
 * Created by 张宇 on 2017/3/13.
 */

public class HomeContract {

    interface View extends BaseView {
        String getAuthKey();
        String getBody();
        void setBusType(ArrayList<BusType> list);
        void setOperationList(List<TroubleContent.Operation> list);
        void startRepairSucceed();
    }

    interface Model extends BaseModel {
        Observable<ApiModel<List<BusType>>> getBusType(String authKey);
        Observable<ApiModel<List<TroubleContent.Operation>>> getOperationList(String authKey);
        Observable<ApiModel<String>> startRepair(String authKey,String body);
    }

    abstract static class Presenter extends BasePresenter<Model, View> {

        @Override
        public void onStart() {

        }

        abstract void getBusType();
        abstract void getOperationList();
        abstract void startRepair();
    }
}